package org.shiwen.week8.answer;

public class Car extends Transport{
    private String fuel;

    public Car(String name, int speed, String fuel) {
        super(name, speed);
        this.fuel = fuel;
    }

    public Car(String fuel) {

    }

    public String getFuel() {
        return fuel;
    }

    public void setFuel(String fuel) {
        this.fuel = fuel;
    }

    public void showFuel(){
        System.out.println(super.getName()+"的燃料类型为："+ fuel);
    }

    @Override
    public void showInfo(){
        super.showInfo();
        System.out.println(super.getName()+"的燃料类型为："+ fuel);
    }

}
